<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Relations\Pivot;

class AdminUsersRole extends Pivot
{
    // 指示是否自动维护时间戳
    public $timestamps = false;

    // 标识 ID 是否自增
    public $incrementing = true;

    protected $table = 'admin_users_role';
    protected $primaryKey = 'ur_id';

    //fillable 属性指定哪些属性可以被集体赋值;Guarded则相反
    protected $guarded = [];

    public function role()
    {
        return $this->belongsTo('App\Models\Admin\AdminRole', 'role_id', 'role_id');
    }


}
